﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TiTi.tea.DAL;
using TiTi.tea.Dto;

namespace TiTi.tea.BLL
{
    public class SpecBLL
    {
        private SpecDAL specDal = new SpecDAL();
        public IEnumerable<SpecDto> GetByTplId(int tplId)
        {
            return specDal.GetAll(o => o.TPLId == tplId, o => o.Seq, true).Select(o => new SpecDto()
            {
                Id = o.Id,
                SpecName = o.SpecName,
                Options = o.Options,
            });
        }
    }
}
